import sys
import importlib


def run():
    if len(sys.argv) < 3:
        if sys.platform == "Windows":
            print("请使用'pmm help'查看帮助")
        else:
            print("请使用'pmm.sh help'查看帮助")
        return
    
    project_dir = sys.argv[1]
    command = sys.argv[2]

    try:
        mod = importlib.import_module(
            "python_microservice_sdk.scripts.%s" % command)
        mod.run(project_dir)
    except Exception:
        print("没有命令'%s', 请使用'pmm.ps1 help'查看帮助" % command)
